﻿using System;
using RayDen.Library.Entity.Interface;

namespace RayDen.Library.Entity.Renderer {
    public class RendererJobInfo : IRenderJob {
        #region IRenderJob Members

        public Guid Id { get; set; }
        public IRayDenLibraryFrame MainFrame { get; set; }
        public IRayDenLibraryFrame[] Frames { get; set; }
        public IRendererOutputSettings OutputSettings { get; set; }
        public IRendererQualitySettings QualitySettings { get; set; }
        public IParameterBag CommonConfig { get; set; }
        public int JobFramesCount { get; set; }
        public int FramesPerSecond { get; set; }
        public string NameTemplate { get; set; }
        public string OutputDirectory { get; set; }

        #endregion

        public RendererJobInfo(OutputSettingsInfo os = null, QualitySettingsInfo qs = null) {
            this.Id = Guid.NewGuid();
            this.OutputSettings = os??new OutputSettingsInfo();
            this.QualitySettings = qs??new QualitySettingsInfo();            
        }



        public RendererJobInfo(IRayDenLibraryFrame mainFrame, IParameterBag configuration,
                               IRayDenLibraryFrame[] frames = null)
            : this() {
            this.MainFrame = mainFrame;
            this.CommonConfig = configuration;
            this.Frames = frames;
            this.OutputSettings = new OutputSettingsInfo(configuration);
            this.QualitySettings = new QualitySettingsInfo(configuration);
        }
    }
}
